// 通用：获取并缓存关注和粉丝数量
export async function fetchAndCacheFollowFansCount(userId) {
	const userObj = uniCloud.importObject('user', {
		customUI: true
	})
	// 关注数
	const followRes = await userObj.getUserProfileWithFollowInfo({
		userId,
		type: 'follow',
		page: 1,
		pageSize: 1
	})
	if (followRes.code === 200) {
		uni.setStorageSync('followCount_' + userId, followRes.data.total)
	}
	// 粉丝数
	const fansRes = await userObj.getUserProfileWithFollowInfo({
		userId,
		type: 'fans',
		page: 1,
		pageSize: 1
	})
	if (fansRes.code === 200) {
		uni.setStorageSync('fansCount_' + userId, fansRes.data.total)
	}
}
